function score = score_hist(hist_data);
img_num = 6;
mask_num = zeros(img_num,2);
data_size = size(hist_data);
distance=zeros(img_num,2);

uniform_data = 1.0/256;
for gray_idx=1:256
    for img_idx = 1:img_num
        mask_num(img_idx,1) = mask_num(img_idx,1)+hist_data(gray_idx,1,img_idx);
        mask_num(img_idx,2) = mask_num(img_idx,2)+hist_data(gray_idx,2,img_idx);
    end
end
for img_idx=1:img_num
    for gray_idx=1:256
        distance(img_idx,1) = distance(img_idx,1)+ abs(hist_data(gray_idx,1,img_idx)/mask_num(img_idx,1)-uniform_data);
        distance(img_idx,2) = distance(img_idx,2)+ abs(hist_data(gray_idx,2,img_idx)/mask_num(img_idx,2)-uniform_data);
    end
end

score=zeros(img_num,1);
for img_idx=1:img_num
    score(img_idx)=(mask_num(img_idx,1)+mask_num(img_idx,2))/ (mask_num(img_idx,1)*distance(img_idx,1)+mask_num(img_idx,2)*distance(img_idx,2));
end
end